package com.harleyquinn.gulimall.order.controller;

import com.harleyquinn.gulimall.order.service.ReceiveMessageService;
import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;


@RestController
public class ReceiveMessageController {

    @Autowired
    ReceiveMessageService receiveMessageService;

    @RequestMapping("/test/receiveMsg")
    public void receiveMessage(Message message, Channel channel) throws Exception {
        receiveMessageService.receiveMessage(message,channel);
    }

}
